import Stats from 'three/examples/jsm/libs/stats.module'

let stats: Stats

function createState (dom: HTMLElement) {
  stats = Stats()
  stats.domElement.style.position = 'absolute'
  stats.domElement.style.left = '0px'
  stats.domElement.style.top = '0px'
  stats.setMode(0)

  dom.appendChild(stats.domElement)
}
export {
  stats
}
export default createState
